function ifExists(list, field) {
	//var field=$('#'+field).val();
	console.log(contains(list, field.trim()));
	//return contains(emails, email);
}

function contains(a, obj) {
    for (var i = 0; i < a.length; i++) {
        if (a[i] === obj) {
            return true;
        }
    }
    return false;
}